package com.mayi.zds_comment.vo;

import lombok.Data;

/**
 * @ClassName ResponseVO
 * @Author zhong
 * @Date 2019/12/24 14:09:03
 * @Version 1.0
 * @see ResponseCode
 */
@Data
public class ResponseVO<T> {
    private String code;
    private String msg;
    private T data;

    public static final ResponseVO<String> SUCCESS = new ResponseVO(ResponseCode.SUCCESS, "success", "");
    public static final ResponseVO<String> FAIL = new ResponseVO(ResponseCode.FAIL, "fail", "");

    public ResponseVO() {
    }

    public ResponseVO(String code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public ResponseVO(String code, String msg, T data) {
        this.code = code;
        this.msg = msg;
        this.data = data;
    }
}
